perm filename NEENIE.MF[BOR,DEK] blob sn#756170 filedate 1984-06-05 generic text, type T, neo UTF8
input bbase;
%sunrules;
%def proofrule(expr a,b)=
% addto e doublepath a..b withpen rulepen enddef;
def draw expr p=
 addto e doublepath p transformed t withpen defaultpen enddef;
def fill expr p=
 addto e contour p transformed t enddef;

N.height=M.height=S.height=W.width=M.width=E.width=24pt;

transform t;
pair midpt; midpt=(.5M.width,.5M.height);
midpt transformed t = midpt;
 theta=-45;
(midpt+(1,0)) transformed t = midpt + ((1,0) rotated theta);
(midpt+(0,1)) transformed t = midpt + ((0,1) rotated theta);

def noise=.3pt*(normaldeviate,normaldeviate) enddef;
def xnoise=(uniformdeviate .6) -.3 enddef;

def pensquare = makepen ((-.5,-.5)..(.5,-.5)..(.5,.5)..(-.5,.5)..cycle)
		enddef;


defaultpen:=pencircle xscaled .5pt yscaled .1pt rotated (45+theta);

def ldown = (-1,-1) enddef;
def down = (0,-1)  enddef;
def left = (-1,0) enddef;
def right = (1,0) enddef;

def upright = (2,1) enddef;
vardef char.N.E=
	
	z1=(.4w,.4h)+noise;	
	z2=(.2w,.45h)+noise;
	z3=(.28w,.7h)+noise;
					z31=z3;
		z4=(.98w-x3,h-y3);		z41=z4;
		z5=(w-x2,h-y2);
		z6=(w-x1,h-y1);		
	  path p;
		p=z3{upright}..z4{upright};
		%p=z1{down}..z2..z3{upright}..z4{upright}..z5..z6{down};
     pen spen;
		spen:= pencircle xscaled2.5pt yscaled .5pt rotated (30+theta);
		draw p withpen spen;
	        %pensquare xscaled 2pt rotated (30+theta);

		pos1(2pt,90);		dz1=(0,1);
		pos2(2pt,60);
		pos3(.5pt,-60);		dz3=(-2,-1);
			pos31(.5pt,-90);		dz31=(2,1.5);
			pos41(.5pt,-90);			
		pos4(.5pt,120);	dz4=(2,1);    dz41=(2,1.5);
		pos9(2pt,-90);
		pos5(2pt,60+180);
		pos6(2pt,90+180); 			dz6=(0,-1);
		pos7(1.5pt,30);
		pos8(1.5pt,120);
			z7=(.4w,0);
			z8=(w-x7,h);
			z9=(.5[x31,x41],.5[y31,y41]);
		curve(3,2,1);
		%curve(31,9,41);
		curve(4,5,6);

		stroke(1,7,.7+xnoise,.8,.2);
		stroke(6,8,.7+xnoise,.3,.2);
		labelpos(1,2,3,4,5,6,7,8,9);
 	showit;

		y11=y13=.5h;	y10=y11+(.1h);	y12=y11-(.1h);
		x11=.9w;	x13=x11+.2w;	x10=x12=(.5[x11,x13]);

		z14=(.5[x11,x13],.5[y10,y12]);
		z15=z14;
 	def flex(expr a,b)=a..controls (.4[a,z14]+noise) and                    
                           (.4[b,z14]+noise)..b enddef;     
     		def pp=flex(z10,z11) & flex(z11,z12)
                       & flex(z12,z13)
                       & flex(z13,z10) & cycle enddef;  
      draw (pp);   %shifted (.1w,0);
	showit;
      draw (pp) shifted ((-w,0)+noise);
	showit;

enddef;
test N.E;
vardef char.N.M=char.N.E enddef; test N.M;
vardef char.N.W=char.N.E enddef; test N.W;
vardef char.M.W=char.N.E enddef; test M.W;
vardef char.M.E=char.N.E enddef; test M.E;
vardef char.S.W=char.N.E enddef; test S.W;
vardef char.S.M=char.N.E enddef; test S.M;
vardef char.S.E=char.N.E enddef; test S.E;
end



	pos20(.6pt+xnoise,30);
	pos21(.6pt,30);
	pos22(1pt+xnoise,30+xnoise);
		z20=(x3-.2w,y3-.2h);	dz20=dz22=(-1,-1);
		z21=(.5(x20+x22),.5(y20+y22));
		z22=(x4,y4-.2h);	
	curve(20,21,22);
	labelpos(22,21,20);
	path p[];
		p1= z20{upright}..z22{upright};
		%draw p1 withpen defaultpen;
	showit;
	
	
enddef;
test N.E;
end